// pages/mine/buyCourse/buyCourse.js
Page({
  data: {
    userInfo: null
  },
  onLoad(opt){
    this.setData({
      userInfo: opt.account && opt || {}
    })
  },
  phone: function (e) {
    wx.showModal({
      content: '请拨打客服电话：400-996-3626',
      confirmText: '拨打',
      confirmColor: '#2A8EFF',
      success: function (res) {
        if (res.confirm) {
          wx.makePhoneCall({
            phoneNumber: '400-996-3626'
          })
        } else if (res.cancel) {
        }
      }
    })
  }
})